import request from '@/utils/request'

// 查询排班规则列表
export function listSchedulerule(query) {
  return request({
    url: '/business/schedulerule/list',
    method: 'get',
    params: query
  })
}

// 查询排班规则详细
export function getSchedulerule(id) {
  return request({
    url: '/business/schedulerule/' + id,
    method: 'get'
  })
}

// 新增排班规则
export function addSchedulerule(data) {
  return request({
    url: '/business/schedulerule',
    method: 'post',
    data: data
  })
}

// 修改排班规则
export function updateSchedulerule(data) {
  return request({
    url: '/business/schedulerule',
    method: 'put',
    data: data
  })
}

// 删除排班规则
export function delSchedulerule(id) {
  return request({
    url: '/business/schedulerule/' + id,
    method: 'delete'
  })
}

// 导出排班规则
export function exportSchedulerule(query) {
  return request({
    url: '/business/schedulerule/export',
    method: 'get',
    params: query
  })
}